package com.mvc.controller.healthmanager;

import org.huangqj.consant.ValidatorUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.druid.filter.AutoLoad;
import com.mvc.model.base.Json;
import com.mvc.model.healthmanager.archive.BloodOxygen;
import com.mvc.model.healthmanager.archive.WeightHeight;
import com.mvc.service.healthmanager.WeightHeightServiceI;

@RequestMapping("/weightHeight")
@Controller
public class weightHeightController {
	
	@Autowired
	private WeightHeightServiceI wServiceI;
	
	@RequestMapping("/getNewWeightHeight")
	@ResponseBody
	public Json getNewWeightHeight(WeightHeight wh){
		Json j = new Json();
		WeightHeight wHeight = wServiceI.getNewWeightHeight(wh);
		if(!ValidatorUtil.isNullOnLong(wHeight.getId())){
			j.setMsg("获取成功");
			j.setSuccess(true);
			j.setObj(wHeight);
		}else{
			j.setMsg("获取数据为空");
			j.setSuccess(false);
		}
		return j;
	}

}
